/*
 * this header file defines the ModularAtomic class
 */

#ifndef __CCCC_MOD_ATOM_H
#define __CCCC_MOD_ATOM_H

#include <string>
#include <vector>

#include "cccc_mod_vio.h"

class ModularAtomic
{
protected:
	string SteroType;
	vector<ModularAtomic *>* Fanins;
	vector<ModularAtomic *>* Fanouts;
	vector<AViolation *>* violation;
	string ModuleDef;
	string COMPONENT;
	string MODULE;
	string SUBMODULE;
	string ROOT;

public:
	ModularAtomic();
	ModularAtomic(string steroType, string moduleDef);
	virtual ~ModularAtomic();

	/*
	 * virtual functions
	 */

	virtual vector<AViolation *>* getViolation()
	{
		return violation;
	}

	virtual vector<ModularAtomic *>* getFanins()
	{
		return Fanins;
	}
	virtual vector<ModularAtomic *>* getFanouts()
	{
		return Fanouts;
	}
	virtual void setFanins(vector<ModularAtomic *>* fanins)
	{
		Fanins = fanins;
	}
	virtual void setFanouts(vector<ModularAtomic *>* fanouts)
	{
		Fanouts = fanouts;
	}

	void addViolation(AViolation * aViolation);

	string getModuleDef();
	void setModuleDef(string moduleDef);
	string getSteroType();
	void printViolation();

	void setCOMPONENT(string comp);
	void setMODULE(string mod);
	void setSUBMODULE(string smod);

	string getCOMPONENT();
	string getMODULE();
	string getSUBMODULE();

	void addFanins(ModularAtomic * fanin);
	void addFanouts(ModularAtomic * fanout);
	string getRelativePath();
	void setRoot(string root);

};

#endif
